/*
 * @title:
 * @Description:
 * @Author: JZT.饶慧勇
 * @Date: 2025-05-29 14:24:15
 * @LastEditors: JZT.饶慧勇
 * @LastEditTime: 2025-06-10 11:21:10
 */
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import uni from '@uni-helper/eslint-config';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import eslintPluginVue from 'eslint-plugin-vue';

export default uni({
  ignores: ['auto-imports.d.ts', 'components.d.ts', '.eslintrc-auto-import.json', '**/uni_modules/**'],
  extends: [
    'plugin:@typescript-eslint/recommended',
    '@vue/typescript/recommended',
    'plugin:vue/vue3-recommended',
    'plugin:vue-scoped-css/base',
    'plugin:prettier/recommended',
    './.eslintrc-auto-import.json'
  ],
  global: {
    ROUTES: true
  },
  plugins: [eslintPluginVue, typescriptEslint, eslintPluginImport, eslintPluginPrettier, eslintPluginSimpleImportSort],
  settings: {
    'import/extensions': ['.js', '.jsx', '.ts', '.tsx']
  },
  rules: {
    'no-console': 'off',
    'style/no-tabs': 0,
    'style/semi': ['error', 'always'],
    'style/comma-dangle': ['error', 'never'],
    'style/quotes': ['error', 'single'],
    'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
    'style/operator-linebreak': 0,
    'style/member-delimiter-style': [
      'error',
      {
        multiline: {
          delimiter: 'semi',
          requireLast: true
        }
      }
    ],
    'style/arrow-parens': ['error', 'as-needed'],
    'no-restricted-syntax': [
      'error',
      {
        selector: 'Identifier[name="undefined"]',
        message: 'Use "void 0" instead of "undefined"'
      }
    ],
    'no-void': 0,
    'vue/html-indent': 0,
    'vue/singleline-html-element-content-newline': 0,
    'antfu/if-newline': 0,
    'node/prefer-global/process': ['error', 'always'],
    'object-curly-newline': 0,
    'antfu/consistent-list-newline': 0,
    'vue/comma-dangle': 0
  }
});
